﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Adams.Web.Models
{
    public class FormOutput
    {
        public bool IsValid {
            get
            {
                return this.InvalidFields.Count == 0;
            }
        }

        public bool IsSaved { get; set; }
        public int ID { get; set; }
        public InvalidFieldCollection InvalidFields { get; set; }

        public FormOutput()
        {
            InvalidFields = new InvalidFieldCollection();
        }
    }

    public class InvalidField
    {
        public string Name { get; set; }
        public int Code { get; set; }
    }

    public class InvalidFieldCollection : List<InvalidField>
    {

    }
}
